small code tweaks