fixed code for a more general install and  added progress bar