script file add header and final instruct, add OD calculate class function