rearranged index methods and fixed #91