A better way to do this.