added unit testing and draft example