format code, fix bug
format code, fix bug 2