clean and optimize comm