added schematic diagram