Refactoring/Re-implementing logInteraction