removed extra setTimeout