works for every provided test case