modified successfully to upload to Xively