modify client function