recursion, map reduce and filter, wrote map reduce and filter