modify batch cnt and refactoring for marker