Tried to implement a visitor