Working removeLast() code