function total stored