optimization tweaks