fixed random tree stuff