complete basic function of map