kinda hacky, but works