Better way to get previous token