class implementation to Traversable interface