minified version added
add undefined restrictions