added cubic class representing a cubic polynomal