refine test, improve insert function