bug fixex; added server code initiallly