filled out application logic in Client.java