update to reduce memory