method to get previous tags