added point calculation and basic unit tests