optimize client