Forest For The Trees algorithm