added check for post