problem with list indices in data['records']