debugging list index out of range