updating version that works with search for all and date search