implemented getTangent function adn working on implementing recursion