edited Client and server