added legacy flag to support old range format