refactored saving images into its own method, changed naming convention