upgraded the polynomial class and changed the five point algorithm accordingly