some more ported logic