Rewrite to fit Hapi style