started to optimize memory footprint