client's func