modified append-to