solved memory problems