added validation and added team to controller