only initialize map if needed