changed delete mechanism