Updated overwrite code