first refactor, ditched jq, added moo