inserted old delete code

temporary, for reference until functions are built