Added recursion, closes #1