Added the new method for computing angles