modified .js for new requirements
Merge pull request #21 from rnecesito/master

modified .js for new requirements