client and server now using select to handle events