update env handling, update client.