some pointer stuff from http://alumni.cs.ucr.edu/~pdiloren/C++_Pointers/neighbor.htm
playing with pointers