update command
refactored
fix tests
refactored