added needed jars and refactored class