using classes for work with geometrical primitives