Maybe a better way to do this.