not sure if there's a smarter way to do this.