refactored simpleRegFlow