finishing server logig