added AngTangle function for scripts