fix calculate