new version

optimize speed