add extension and fix some little issues