some performance tweaks