created downloadtestimage function and minor changes