Making a function to test if the values are correct