new mapping code