A simple model of recognition and recall memory