solve the cell in edge problem