changed code to use jq