remove dependency on userFactory