build map to improve performance