Improve sensor querying