Adding "last" function for metrics