work on outlining control flow