clean up duplicate code
clean up duplicate code
update users test