actually works now

it returns simpson's index