more code tweaks