changed point2d to template
merged