drop in optfunc until lastopt is ready