Prefix tree is partially working now