changed math angle-change function