changed index and fooplot