added more recursive functions from edX