creating JSON parsing functionality