Added map function.