index error fixed 2