add jq file, move some snippet from js file into jq file