add Tree class, tests  and update README