implemented the majority of the visitor
more changes, fixing the class checking
forgot this one