added travis config
added tests and fixed up