change the all function into a generator
implement all function in a more usable way, remove unused class private variables