made changes to allow filtering