added calculation methods to tasks and unit tests