changed the function for blog