some tweaking on memory footprint