added program description and fixed nonrecursive mode