add User interaction class and refactored