Updated

separated client and server side codes