update with mathematical solution