implemented dependency deletion for posts