refactored to commonJS module; added Karma test,coverage