getting rid of an unnecessary endif