fixed bug with circuit edges indexing, proceed to debug