tweaks for better memory usage