main interaction loop