new method for creating mapping file