added minified version, separated example code