Modify fourMomentum function