updated json parsing to remove [unowned self]