made a repo of the gist, added tests with jasmine