impliment es6 defs

see #98