this is horrible, but it's legacy-horrible, and I don't know how to avoid it