added slider functionality, controls animation speed in main window