working on client factory