adapted to Hive 0.1.0.3