made save image a method call