Added a function to return the indexes