fix map to return pointer