added a new jar constructor
improved loop logic in option A