added reference code for hadoop