add type list & better write js