updates map by key