try to minimize memory footprint