WIP: add more flow logic'