refactoring blockwise complete