remove unneeded if condition