Changed certainty to confidence
Added date parsing function