angle code

added functionality to calculate angle components