delete unneeded if condition