getImagesFiltered subroutine added