new function for returning the returns of indexs