changed variable to "i" from "1"