added a new function in select