some tweaks for better performance