updated with latest contribution. But problem exists if code is re-generated: it will overwrite the user changes.