total compensation calculation