just make this a function defined *inside* shift itself. if its truly reusable them move to ``core/common``, but I don't think used anywhere else, so just move to inside.