add upgrade command
refactoring update command