less hard coded ,only the number of images and their names are hardcoded,the folder and the pattern are now entered by the user