improve flow

sorry these are two separate PRs