refactoring jq