updated init for src, updated tests, added exception checks in
calculation functions