now can take different jpeg extentions