Added getLatestPublished function