refactor to get rid of 'client' path