basic java design, formatting