updated decimal calculation