added Json parsing, object counting, debug prints, and an access function