backup: some impovements in r-script