refactor package install