add unmap_client function