added missing dependencies and script refactor
added missing dependencies and script refactor