Refactor assign users