This *looks* to work, but I'd like a second opinion on whether this is best practice, or whether there are any issues using this.