added a new function to user_stats