Add map function and reverse