adding ConnectionHandler class, instances of this class are executed by a thread