added validation to router