added generic map and generic reduce