refactored some User code