speed up
fix bug