update opts (using key/tree)