add tolist and tomap method