Added a map function.