if statement, significant speedup