added some more tests
ready for npm