change val-list to more general val-map