improve delete() functions