server implimentation almost complete