minor code tweaks