more pr refactoring