with recursion/semirandomness