main -> client