don't call strlen twice