modify renamed to rename, added expand option