format code, remove unused code #10