make code clean by macro.