rewrite server launch - fixes #1