Changing show index methods to single method