minor edits, access json obj directly instead of iterate