Adding logic for play, pause, reset