added a filter and functions for logquery