implemented js validation
updated...