more work on opt_g