add polynomial routine