recursive functional parsing working