index2, removing old function