added createServer funtion