refactoring, flushes, profile