(fix) adds intFact function and checks edges