metatable and __index support