prefix tree contains test and method
refactor prefix tree nodes children to be object
refactor contains to use children object