Shell for prob2
Recursive and generative methods