WIP: Implemented basic recursive function