it pains me to do it this way, but it seems to be the only way