fix nesting issue
fix example
added tests
added travis