move "reiter" adding to function