added visitor to keep track of coordinates