finish reviding the fixed-up image load/save API