redid project 2, but this time with a swing gui