refactoring install task functions