forgot proper use of map-val
maybe this uses proper indirection
fixing assertion