avoid using string offsets