catching IndexError