replacing using the base collection as this was incorrect with a filter in the form of a where clause