replace map to array