add documentation, modify example file