length dynamically calculated via query length