small type changes, fewer calls to strlen