use replace to replace the doctrine