add header, fix some stuffs