remove duplicate code to generate Project map