refactored the code used to animate the audio cassette