implement server apis