removeElement returns the element
added remove first and last