This function is actually only used in the tests, but I guess it's okay to still have it around.