should be (int)i as per style guide.