more compile refactoring