fixing update command
more refactors