added initial client processing loop.