Simple helper functions for filtering input data