added removeFront and removeRear methods