refactor installation process