fixed issue with fit method. Earlier was using ancestors method which used to return all the nodes above it in the family which we didn't need. Now have replaced it with predecessors