add start and close method to server