Fixed 'filter' to utilize mongoDB  query method