updates to reduce mem usage