ajusted to new package
implement visitor pattern