added changes on sideNeighbor