second commit. added tests and example