try to avoid empty loops