Added insertion function for polynomial class.