refactoring (build with errors)