added gen edit in place