kinda hacky, but it works