use map instead of slice for response