adding polyfit for trigfuns.