code format
implemented internal traverse