---added class and a test for this class in tests folder.