improving map saving