added dymanic segements to select string