Modified code to work with hadoop

Signed-off-by: Archit Shukla <archishukla2@gmail.com>