handle polynomial regression