solving higher degree polynomial in a fun way