Changed to accept non-variable polynomial