hm. may be missing something, but why use `strlen` when you already have `ptr->length`?