addressing "undefined variable: e" error

closes #29