Added regression for external variables. See #36.