get last value method