though really feels like there should be a less ugly way to do this.