add repnum (tested)