update to lower memory use