attempting to implement the visitor pattern...