migrate client functions with debugging functions