-added option to choose between PERFORMANCE and LOW_MEMORY