added user stats modal and helper functions