adding the class implementation and a simple test