first draft of recursive definitions of functions