Fix the code to fit the new communication format