Move hapi logic