[hapi] Modified to follow the coding roule.