First version of memory based model.