added trig functions