adding post observer code