add some performance tweaks