updated blog code