pass client id by value

instead of passing client id by address, it is now passed by value,
leading to a safer handling of the value by the user