added code to test neighbors