removing iterative circuit; code cleanup