added second calculation method