follows main server code....for few additions i can do