moving code to skysail.server