implement --set-from-variables and --set-to-variables options