JJ refactoring