minor tweaks and refactor