Added implementation of circuit simulation