updated packages, fixed a bug

created packages for java files
fixed the off by one error in "phase 2"