modify to make compatible with hadoop 2