neatened code and tried to fix jq slugishness