added logic for creation of mappings