reorg: move add0 setup function