optimize codes style