added if checcks in case mapping already exists