Tweaked the code and added a play/pausebutton