remove unused statement and modify code style