checking only root nodes reduces time to 1.5 secs. still wrong answer though :(