refactor code formatting