modify mylib and fix bug