added some views and tree logic