fixed sorting
refactored renaming and added it as a separate command