Circuit finder util code