Added code back after fixing some circuit problems