Prepare recursive code