some renaming and checking