server protocol partially done.