admittedly hacky but I'm not sure how to do this better.