implemented multiple connection support