updated gitignore and refactored showImage()