and I am having a hard time seeing how to refactor this lil peice of code without exposing the "i" thru all the callbacks