this is clunky, but it might just work