add some test and fix some little problem