made some changes to work with hadoop2