Check Rex::Test to see if there is an existing function that can be used for these two functions