uses strlen instead of .length