Implemented Server Logic.