commented and fixed date searching