changed to having xml or json options, and raw data option, towards #6 and #7