added slider to control level of recursion