handles one client