improve visitor pattern