corrected if statment