Changed i++ to i += 1