make memory improvements