Changed i to an int