taking the index number out of the view