add a test for the new logic