Put incrementer inside if statement