solved problem of calculation