removed double if