added new way of calculating angles