added communication code