updated tests, fixed bug in trig.coffee