added select() in server. its single threaded now