added minified version
tiny refactoring