add mapping algorithm