Work done by a system against gravity