Added helper function to help keep code a little more readable.