update to opt.py