adding a function to simplify the test