[WIP] refactor mapping to generalize target class