added loop select