Found a problem in isEdge(). Disbaled the function so far