implement word family tree