updated model and able to match type to nodes and ways