implemented several root finding algorithms