Changed traverse to be a member method