updated delete functionality for posts