refine code, add total user count