Adding assign teams logic