listens to clients' requests