Updated for HAPI 6.x