added class for working whith db and tree