changed code structure, made the methods not static and created a external testing class