Implemented trigonometric functions