Mess, but works.