tweaks from @GraylinKim code review