making Java code recursive
put terms into separate folders