implementing neighbors