Better method of doing this.

Just made it a bit simpler.