code of remap_entry app modified.