copying over original AddTail impl, for study