use sample code from xively