changed visitor to accept native objects