playTrack function increases modularity