add mapfunc sample