updated to latest SDK
fixed deprecated use of query/queryAll