create the inverts map