Works with sparse nodes I think, forgive me for the sysouts