refactor and fix for active users list