register the callbacks in options
can set metatable in options