run server loop