still trying to figure out the memory errors