switch to team-based interaction
move input generation logic to anonymous subs