fix communication,TODO: remove debug,fix rest