J q refactor