writes on server