Updated angle code