added validation for phrases