updated internal functions exercise to unset the variable before the first conditional