Work done and energy calculations