head,take:add support for tables