added auto sequence for res and bag