fixed the updated angle code