pulled out map from main code