update & add AMD support use require js