add Boundry Check and Data Recorder