Updated mapper code