fix small bugs in test, rewrite insert_list