refactoring pjsx