I'll refactor this.