loop in server