finished cycle_memory(), but haven't tested