polishing if-condition