changed method post_delete to pre_delete