I'm convinced there's a easier way to do this.