added server parameter
mac stuff
added server handling (2)