more optimization
more optimization
fix ang function