add -h, some changes