slight alteration in connectionhandler