minified
min
cleaned code a bit, added validation