add delete to head and end