Updated trigonometric functions