added function for filtering frames more easily