update all dependecies and refactor code for updating