remove unnecessary callback parameter
added check to execute callback once
updated the minified version