implement append and insertNth