index error fixed 3