use Traversable check, and remove debug code