safer deletion based on id