cast z values as double, edit comments