normalize arrays