eliminate original if statements