Maybe working skeleton of very poor tree implementation