added validation in and match