add implementation for map