Reimplemented half of rescan() function