adding a test for valid case