refactor install