trying to fix out of memory