modify the logic to replace AB on server.