finish writing base server