Added calcuate func for: