Also code should be simplified to use just one `filter` statement and add all the conditions into a single predicate. IMO that should be more clear (the time condition should be checked only if the node matches the prefix, to keep the current performance).