debug the algorithm, circuits for test file work, while on manual input 1 ring may be missed