added compose method to Polynomial