changed APIquery to function; fixed bart.count and bart.elev