Added an example file and fixed a small issue in the class