fix map-function