recreated server from sccratch