finish communication func