Updated few changes to demo codes
Added custom reduce first implementation