removed extra head and tail node