adjust loop to go through end
fix loop duration