very barrier refactor