add small improvement to query