add tests, add node / browser support