communication function handler