CPP-153 refactor