added stuff to get swipe to work for index values greater than 1digit.