changed elements to map from T to Node