Delete from tail function