small changes to keep memory footprint down