added try insted of throw
added client to gui