Slightly cleaner approach to this.