python 2.5 does not support tuple.index()