implemented track looping
modified loop