Used map function for class extension example.