code and tests are working for poly