this has a (mostly) working beginning version of opt 3