refactor install and deployment