made a generalized function for filtering matches by column