refactoring some RBD work