fix codestyle
refactor code