add patch headerfile, delete test code