minor improvements to code flow