Write a simulation for checking the Jarzynski equality