updated calculation