fix require bug
refactor require test and demo