conditional refLine assignment