changed so it works with hapi3