refactored to separate visitor, filters, etc