used coffeescripts do statement to prevent for loop callback bug