updated removeLast()