make some error messages more descriptive
replace the cubic test with a sinus function based test