thera to stop when memory is full