fixing to work with refactored client