make classic for java solution more verbose