moving variables from rp to w