duped variable assignments to avoid running twice