bulk of spatial memory and more testing functions