working on trigonometric functions