added published_at field and replaced in code