refactor code style for mclient