Gas expansion and work done