implement user usage report, and made some refactoring