much better recursive definitions
much better recursive definitions