oop improve with exceptions
Merge pull request #8 from evsyukovmv/oop

oop improve with exceptions