centralize the straddling code madness