refactored the code, counts number of user actions instead of all names