added rate modulation to optical detector