Added examples and wrote documentation