if statement around publishDate
initialize search on first view