adding interact function to main