Updated to use HAPI 2.x