Created logic for server adn updated GUI for client