automatically detect whether suffix is bagnr