add new test and fix it
fix bugs