added some tests and a fix for a case where there are no blog posts