Changed getLastValue return type from float to double