clear map function written