A contribution to the theory of memory