changed Node to accept a type