correct cast to get double values