Change the [] method to return the index value and the initialize method to take the values