added slider to control time.