Added delete algorithm