improviding end point for foreach