handles multiple clients