its a bit buggy, there seams to be some problem with recursion.