refactor mappings into a standard interface