feature: add class DataBlock to encapsulate the io operation
demo: change code to fit the new class DataBlock