extract adding case index reference to method