refactor and separate import db client from server db client