updated blogs query such that it adds a blog only if it's not already in the table