some more work, schematic revised to use flash