it is weird that assign_team returns the user_type - can you express this routine in another way?