Added code based on BioCircuit