updated sample project to use MAP_FOREIGN_TO_LOCAL macro