add test for invalid list index