changed calculate function doc string