added oscilliscope code